﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WindowsFormsModel.ActionServiceReference;

namespace WindowsFormsModel.BusinessObjects
{
    public class RestaurantMenuModel
    {
        public string MenuID { get; set; }

        public string MenuCode { get; set; }

        public string MenuName { get; set; }

        public string Description { get; set; }

        public string UnitID { get; set; }

        public decimal SalesPrice { get; set; }

        public byte[] MenuImage { get; set; }

        public bool IsActive { get; set; }

        public bool IsNorm { get; set; }

        public string RestaurantID { get; set; }

        public string MenuCategoryID { get; set; }

        public string RequestMessage(string action, RestaurantMenuModel restaurantMenuModel)
        {
            StringBuilder message = new StringBuilder();

            if (action == null) { message.Append("null"); } else { message.Append(action); }
            message.Append("|");

            if (restaurantMenuModel.MenuID == null) { message.Append("null"); } else { message.Append(restaurantMenuModel.MenuID); }
            message.Append("|");

            if (restaurantMenuModel.MenuCode == null) { message.Append("null"); }else { message.Append(restaurantMenuModel.MenuCode); }
            message.Append("|");

            if (restaurantMenuModel.MenuName == null) { message.Append("null"); } else { message.Append(restaurantMenuModel.MenuName); }
            message.Append("|");

            if (restaurantMenuModel.Description == null) { message.Append("null"); } else { message.Append(restaurantMenuModel.Description); }
            message.Append("|");

            if (restaurantMenuModel.UnitID == null) { message.Append("null"); } else { message.Append(restaurantMenuModel.UnitID); }
            message.Append("|");

            if (restaurantMenuModel.SalesPrice == null) { message.Append("null"); } else { message.Append(restaurantMenuModel.SalesPrice); }
            message.Append("|");

            if (restaurantMenuModel.IsActive == null) { message.Append("null"); } else { message.Append(restaurantMenuModel.IsActive); }
            message.Append("|");

            if (restaurantMenuModel.IsNorm == null) { message.Append("null"); } else { message.Append(restaurantMenuModel.IsNorm); }
            message.Append("|");

            if (restaurantMenuModel.RestaurantID == null) { message.Append("null"); } else { message.Append(restaurantMenuModel.RestaurantID); }
            message.Append("|");

            if (restaurantMenuModel.MenuCategoryID == null) { message.Append("null"); } else { message.Append(restaurantMenuModel.MenuCategoryID); }
            message.Append("|");

            return message.ToString();
        }
    }
}
